package com.sky.mapper;


import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    Integer countBySetmealDishAndIds(List<Long> ids);


    //--根据套餐添加
    void insertBySetmealIdBath(List<SetmealDish> setmealDishList);

    //--根据套餐id删除
    void deleteBySetmealIds(List<Long> ids);

    //--根据套餐id查找
    @Select("select * from setmeal_dish where setmeal_id=#{id}")
    List<SetmealDish> selectBySetmealId(Long id);


    //--根据套餐id删除[单个]
    @Delete("delete from setmeal_dish where setmeal_id=#{id}")
    void deleteBySetmealId(Long id);
}
